package com.library.common.core.domain.model;

import com.library.common.core.domain.entity.SysUser;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @Package: com.educationalsystem.system.domain.vo
 * @ClassName: StudentBasic
 * @Author: Yin
 * @Date: 17:48
 * @Description: 学生基本信息,数据来源 student
 */
@Data
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
public class StudentBasic implements Serializable {

    private static final long serialVersionUID=1L;

    /** id */
    private Long studentId;

    /** 学生学号 */
    private String studentNumber;

    /** 学生姓名 */
    private String studentName;

    /** 学生虚名 */
    private String studentNick;

    /** 学生性别 */
    private String studentSex;

    /** 学生宿舍楼层 */
    private String studentDorm;

    /** 学生的班级 */
    private String studentClass;

    /** 学生手机号 */
    private String studentPhoneNumber;

    /** 学生头像 */
    private String studentHeadPic;

    /** 卡号 */
    private String walletCardNumber;

    /** 卡余额 */
    private BigDecimal walletBalance;

    /** 卡状态 */
    private String walletStatus;

    public StudentBasic(Long studentId, String studentNumber, String studentName, String studentNick, String studentSex, String studentDorm, String studentClass, String studentPhoneNumber, String studentHeadPic) {
        this.studentId = studentId;
        this.studentNumber = studentNumber;
        this.studentName = studentName;
        this.studentNick = studentNick;
        this.studentSex = studentSex;
        this.studentDorm = studentDorm;
        this.studentClass = studentClass;
        this.studentPhoneNumber = studentPhoneNumber;
        this.studentHeadPic = studentHeadPic;
    }

    /** 保证api中能正常返回的SysUser最低限度数据 */
    public SysUser toSysUser() {
        return new SysUser()
            .setUserNumber(getStudentNumber())
            .setUserName(getStudentNumber())
            .setNickName(getStudentNick())
//            .setStudent(this);
        ;
    }
}
